package com.yehui.first;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class A {

    //半自动注入----手工注入
    //用的是反射注入 filed
    @Autowired
    private Y y;



    @Autowired
    //表面上等同于Y的注入
    public void setZ(Z z){
        System.out.println("z"+z);
    }


    public void setX(X x) {
        System.out.println("x-------"+x);
    }

    public void  printInfo(){
        System.out.println("y-------"+y);
    }
}
